package com.info3k.client;

import java.util.List;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.info3k.client.domain.Address;
import com.info3k.client.domain.Category;
import com.info3k.client.domain.Event;
import com.info3k.client.domain.Location;
import com.info3k.client.domain.User;

/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("info")
public interface Info3KService extends RemoteService {
	void infoServer(String s);
	Boolean isAvailableUsername(String username);
	Boolean registerUser(User u, String response, String challenge);
	Boolean recoverPassword(String username, String response, String challenge);
	void addUser(User u);
	User changePasswordForUser(User u, String oldPassword, String newPassword);
	User logInUser(String username, String password);
	User checkIfLogged();
	Boolean logOutUser(User u);
	List<Location> getLocationsByFilter(String filter, Category category, Integer pageSize, Integer current);
	void addLocation(Location location);
	void addAddress(Address address);
	void addCategory(Category address);
	void addEvent(Event event);
	List<Address> getAddressesByFilter(String filter, Integer pageSize, Integer current);
	List<Address> getLatestAddress(int count);
	List<Location> getLatestLocations(int count);
	List<Event> getLatestEvents(int count);
	List<Location> getLocationsByUser(User user, Integer pageSize, Integer current);
	List<Address> getAddressesByUser(User user, Integer pageSize, Integer current);
	List<User> getLatestUsers(int count);
	List<Category> getAllCategories();
	List<Event> getEventsByFilter(String filter, Integer pageSize, Integer current);
	List<Event> getEventsByUser(User user, Integer pageSize, Integer current);
	void rateEvent(Event loc, Double rate);
	void viewEvent(Event event);
	void rateLocation(Location loc, Double rate);
	void viewLocation(Location loc);
}
